<h1 class="page-header">
    <small>订单详情</small>
</h1>
<hr/>
<div class="panel panel-inverse" data-sortable-id="form-stuff-1">
    <div class="panel-heading">
        <h4 class="panel-title">订单信息</h4>
    </div>
    <div class="panel-body">
        <form class="form-horizontal" id="orderForm" name="orderForm" action="" method="post">
            <div class="order-detail-info">
                <div class="title">基础信息</div>
                <div class="data-rows">
                    <div class="col-md-4">
                        <span class="head">订单号：</span>
                        <span class="control-label">${orderInfo.orderSn}</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">订单状态：</span>
                        <span class="control-label">${orderInfo.statusText}</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">订单类型：</span>
                        <span class="control-label">${orderInfo.typeName}</span>
                    </div>
                </div>
                <div class="data-rows">
                    <div class="col-md-4">
                        <span class="head">订单时间：</span>
                        <span class="control-label">${orderInfo.createTime}</span>
                    </div>
                    <div class="col-md-8">
                        <span class="head">备注信息：</span>
                        <span class="control-label"><#if orderInfo.remark>${ orderInfo.remark }<#else>--</#if></label>
                    </div>
                </div>
            </div>
            <div class="order-detail-info">
                <div class="title">支付信息</div>
                <div class="data-rows">
                    <div class="col-md-4">
                        <span class="head">支付金额：</span>
                        <span class="control-label" style="color:red;">￥<#if orderInfo.payAmount gt 0 >${orderInfo.payAmount}<#else>0.00</#if></span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">优惠金额：</span>
                        <span class="control-label">￥<#if orderInfo.discount gt 0>${orderInfo.discount}<#else>0.00</#if></span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">支付方式：</span>
                        <#if orderInfo.payType == 'JSAPI' && orderInfo.payStatus == 'B'>
                        <span class="control-label">手机微信支付</span>
                        <#elseif orderInfo.payType == 'MICROPAY' && orderInfo.payStatus == 'B'>
                        <span class="control-label">微信扫码支付</span>
                        <#elseif orderInfo.payType == 'ALIPAY' && orderInfo.payStatus == 'B'>
                        <span class="control-label">手机支付宝支付</span>
                        <#elseif orderInfo.payType == 'CASH' && orderInfo.payStatus == 'B'>
                        <span class="control-label">现金</span>
                        <#else>
                        --
                        </#if>
                    </div>
                </div>
                <div class="data-rows">
                    <div class="col-md-4">
                        <span class="head">支付时间：</span>
                        <span class="control-label"><#if orderInfo.payTime>${orderInfo.payTime}<#else>--</#if></span>
                    </div>
                </div>
            </div>
            <div class="order-detail-info">
                <div class="title">会员信息</div>
                <div class="data-rows">
                    <div class="col-md-4">
                        <span class="head">会员ID：</span>
                        <span class="control-label">${orderInfo.userId}</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">会员名称：</span>
                        <span class="control-label">${orderInfo.userInfo.name}</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">手机号：</span>
                        <span class="control-label"><#if orderInfo.userInfo.mobile>${orderInfo.userInfo.mobile}<#else>无</#if></span>
                    </div>
                </div>
            </div>
            <#if orderInfo.goods>
            <div class="order-detail-info">
                <div class="title">商品信息</div>
                <div class="form-group">
                    <div class="col-md-12" style="margin-top: 10px;">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>商品</th>
                                <th>规格</th>
                                <th>价格</th>
                                <th>优惠价</th>
                                <th>数量</th>
                            </tr>
                            </thead>
                            <tbody>
                            <#list orderInfo.goods as ct>
                            <tr>
                                <td>
                                    <img class="goods-logo" src="${ct.image}">
                                    <span class="goods-name">${ct.name}</span>
                                </td>
                                <td>
                                    <#if ct.specList>
                                    <#list ct.specList as sp>
                                    <span class="goods-spec">${sp.specValue}</span>
                                    </#list>
                                    </#if>
                                </td>
                                <td>￥${ct.price}</td>
                                <td>￥<#if ct.discount gt 0>${ct.discount}<#else>0.00</#if></td>
                                <td>${ct.num}</td>
                            </tr>
                            </#list>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            </#if>
            <#if orderInfo.type == 'goods'>
            <div class="order-detail-info">
                <div class="title">配送信息</div>
                <div class="data-rows">
                <#if orderInfo.orderMode == 'oneself'>
                    <div class="col-md-4">
                        <span class="head">配送方式：</span>
                        <span class="control-label">自提</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">自提店铺：</span>
                        <span class="control-label">${orderInfo.storeInfo.name} ${orderInfo.storeInfo.phone} ${orderInfo.storeInfo.address}</span>
                    </div>
                <#else>
                    <div class="col-md-4">
                        <span class="head">收货人：</span>
                        <span class="control-label">${orderInfo.address.name}</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">联系电话：</span>
                        <span class="control-label">${orderInfo.address.mobile}</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">配送地址：</span>
                        <span class="control-label">${orderInfo.address.provinceName}${orderInfo.address.cityName}${orderInfo.address.provinceName}${orderInfo.address.regionName}${orderInfo.address.detail}</span>
                    </div>
                </#if>
                </div>
            </div>
            </#if>
            <#if orderInfo.expressInfo>
            <div class="order-detail-info">
                <div class="title">物流信息</div>
                <div class="data-rows">
                    <div class="col-md-4">
                        <span class="head">物流公司：</span>
                        <span class="control-label">${orderInfo.expressInfo.expressCompany}</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">物流单号：</span>
                        <span class="control-label">${orderInfo.expressInfo.expressNo}</span>
                    </div>
                    <div class="col-md-4">
                        <span class="head">发货时间：</span>
                        <span class="control-label">${orderInfo.expressInfo.expressTime}</span>
                    </div>
                </div>
            </div>
            </#if>
            <div class="form-group">
                <div class="col-md-12" style="text-align: center;">
                    <button type="button" class="btn btn-sm btn-danger" onclick="getData('${rc.contextPath}/backend/order/list', 'displayArea')">返回订单列表</button>
                </div>
            </div>
        </form>
    </div>
</div>
